From 33ae33f2c29987138dc8a7be0ad7ff026b604ac7 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 28 Feb 2010 02:31:28 +0000 Subject: [PATCH] Add check to GDB for unreasonable internal values from beta Mapsource from '06. --- gpsbabel/gdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gpsbabel/gdb.c b/gpsbabel/gdb.c index 58d6e9d5b..0d9db9904 100644 --- a/gpsbabel/gdb.c +++ b/gpsbabel/gdb.c @@ -110,8 +110,8 @@ /*******************************************************************************/ -/* static char gdb_release[] = "$Revision: 1.70 $"; */ -static char gdb_release_date[] = "$Date: 2010-01-13 22:52:52 $"; +/* static char gdb_release[] = "$Revision: 1.71 $"; */ +static char gdb_release_date[] = "$Date: 2010-02-28 02:31:28 $"; static gbfile *fin, *fout, *ftmp; static int gdb_ver, gdb_category, gdb_via, gdb_roadbook; @@ -1038,6 +1038,7 @@ read_data(void) fin = fsave; delta = len - gbftell(ftmp); + is_fatal(delta > 1000000, "Internal consistency error. Delta too big"); // Avoid finite loop on bogus beta files from '06. // THe 100000 is totally pulled from my hat. -- 2.30.2